/**
 * Created by hps on 17-4-29.
 */
public class PriorityQApp {
    public static void main(String[] args) {
        PriorityQ pq = new PriorityQ(5);
        pq.insert(30);
        pq.insert(50);
        pq.insert(10);
        pq.insert(40);
        pq.insert(20);

        while (!pq.isEmpty()) {
            System.out.print(pq.remove() + " ");
        }
    }
}
